//
//  AppDelegate.swift
//  LEOweibo
//
//  Created by zz on 16/2/21.
//  Copyright © 2016年 zz. All rights reserved.
//

import UIKit
import AFNetworking
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        print("-----\(UserAccount.sharedUserAccount)---------")
        //同意设置导航栏的外观
        setUpNavBarAppearence()
        
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.rootViewController = MainViewController()
        window?.backgroundColor = UIColor.whiteColor()
        window?.makeKeyAndVisible()
        
        
        return true
    }
//同意设置导航栏外观
    func setUpNavBarAppearence() {
        
        UINavigationBar.appearance().tintColor = UIColor.orangeColor()
    }


}
extension AppDelegate {
    
    func setupNetwork() {
        AFNetworkActivityIndicatorManager.sharedManager().enabled = true
        NSURLCache.setSharedURLCache(NSURLCache(memoryCapacity: 4*1024*1024,
            diskCapacity: 20*1024*1024,
            diskPath: nil))
    }
}
